Skip to content

fix: Ignore client directives on fragments#2942

Open
raymondwang wants to merge 1 commit into
graphql-hive:masterfrom
raymondwang:raymond/known-directives-ignore-client-directives-on-fragments
Open

fix: Ignore client directives on fragments#2942
raymondwang wants to merge 1 commit into
graphql-hive:masterfrom
raymondwang:raymond/known-directives-ignore-client-directives-on-fragments

Conversation

@raymondwang
Copy link
Copy Markdown

@raymondwang raymondwang commented Jan 24, 2026

Description

The ignoreClientDirectives option for the known-directives rule only filters directives on Field and OperationDefinition nodes. It doesn't filter directives on FragmentDefinition, FragmentSpread, or InlineFragment nodes.

Fixes #2941

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added test cases to packages/plugin/__tests__/known-directives.spec.ts

Test Environment:

  • OS: Mac Tahoe 26.1
  • @graphql-eslint/...: 4.4.0
  • NodeJS: v24.13.0

Checklist:

  • I have followed the CONTRIBUTING doc and the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@raymondwang raymondwang changed the title Fix: Ignore client directives on fragments fix: Ignore client directives on fragments Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

The ignoreClientDirectives option for known-directives does not work with fragments

1 participant